package cn.org.guhao.practice.go.dao;

import cn.org.guhao.practice.go.model.Department;

import java.util.ArrayList;
import java.util.List;

public class DepartmentDao {

  public void delete(Long departmentId){
    String sql = "递归查询语句";
    List<Long> ids = null;
    delete(ids);
  }

  public void delete(List<Long> ids){
    StringBuilder sqlBuilder = new StringBuilder("DELETE FROM DEPARTMENT WHERE ID IN (");
    for(Long id:ids){
      sqlBuilder.append("?,");
    }
    sqlBuilder.deleteCharAt(sqlBuilder.length()-1);
    sqlBuilder.append(")");
    // TODO:执行SQL语句
  }

  public List<Department> findAll(){
    String sql = "SELECT * FROM DEPARTMENT";
    List<Department> list = new ArrayList<Department>();
    return list;
  }

}
